//
//  OneImageTableViewCell.m
//  BuffetNews
//
//  Created by 李荃荃 on 14-11-5.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "OneImageTableViewCell.h"

@implementation OneImageTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.titleLabel];
        [_titleLabel release];
        self.authorLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.authorLabel];
        [_authorLabel release];
        self.imgView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imgView];
        [_imgView release];
    }
    return self;
}

- (void)awakeFromNib
{
    // Initialization code
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(10, 0, self.contentView.frame.size.width / 3 * 2 - 10,  self.contentView.frame.size.height/ 3 * 2);
//    self.titleLabel.font = [UIFont systemFontOfSize:16];
    self.titleLabel.numberOfLines = 0;
    self.authorLabel.frame = CGRectMake(10,  self.contentView.frame.size.height / 3 * 2,  self.contentView.frame.size.width,  self.contentView.frame.size.height / 3);
    self.imgView.frame = CGRectMake( self.contentView.frame.size.width / 3 * 2, 10,  self.contentView.frame.size.width / 3 - 10,  self.contentView.frame.size.height - 20);
    self.authorLabel.font = [UIFont systemFontOfSize:10];
    self.authorLabel.textColor = [UIColor grayColor];
}
- (void)dealloc
{
    [_imgView release];
    [_titleLabel release];
    [_authorLabel release];
    [super dealloc];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
